/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 */
'use strict';
import React, {
    Component,
} from 'react';

import {
  StyleSheet,
  Text,
  View,
  Image,
} from 'react-native';

import Colors from '../styles/colors';
import Ionicons  from 'react-native-vector-icons/Ionicons';

export default class TabIcon extends Component {
    constructor (props) {
      super(props)
    }

    render(){
        var color = this.props.selected ? Colors.default_theme : '#666';
        return (
            <View style={[styles.iconContainer,this.props.tabBarBtnStyle]}>
                <Ionicons style={{color: color}} name={this.props.iconName} size={24} />
                <Text style={{color: color}}>{this.props.title}</Text>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    iconContainer:{
        flex:1,
        flexDirection:'column', 
        alignItems:'center', 
        alignSelf:'center'
    }
});
